package s;

public class Son extends S{
    /**
     *  属于类的静态变量，属于类本身
     */
    public static String schoolName;
    public  String schoolName2;


    static {
        System.out.println("静态代码块");
//        Class.forName("com.mysql.jdbc.Driver");
    }

    {

        System.out.println("非静态代码块");
    }


    public Son() {
        System.out.println("SON无参构造方法");
    }

    public Son(String name, double money, String schoolName) {
        super(name, money);//只能使用, 不能继承
        this.schoolName = schoolName;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }
}

